/**
 * 标签组
 * @params datasets 数据
 */
export function tagFormat(datasets) {
  const { source, type, dimensions = undefined } = datasets;
  let seriesData = [];
  if(type === 'STATIC') {
    seriesData = source;
  }else{
    source.length && (seriesData = source.map((item) => ({
      content: item[dimensions.xAxis],
    })));
  }
  return {
    seriesData,
  };
}